<template>
  <div class="loading-wrapper" v-if="show">
    <div class="mask"></div>
    <div class="tip">{{ title }}:loading...</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: false,
      title: '',
      timer: null,
    }
  },
  created() {
    // console.log('created----loading------------')
    // if (this.timer) clearTimeout(this.timer)
    // this.timer = setTimeout(() => {
    //   this.show = false
    // }, 3000)
  },
}
</script>

<style lang="scss" scoped>
.loading-wrapper {
  width: 100vw;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  .mask {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: #000;
    opacity: 0.6;
  }
  .tip {
    padding: 20px;
    font-size: 30px;
    color: #000;
    background: #fff;
    z-index: 10;
  }
}
</style>
